<?php
require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'autoload.php';

use payClass\Datebase;
use payClass\QRcode;
use payClass\pay\Config;

/**
 * 出款
 */
class AsynNotice
{
    public static function notice()
    {
        $db     = new Datebase();

        $config = new Config();

        $param  = $db->param();

        // file_put_contents('data.txt', json_encode($param)."\r\n",FILE_APPEND);

        $sign = Config::encrypt($param);

        if ($sign != $param['sign']) exit('验签失败');

        $res = $db->withDrawRun(['order_number'=>$param['order_number']]);

        if (!$res) exit('验签失败');

        exit('success');
    }
}

AsynNotice::notice();
